Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show lines in our facet tests that are outside of the range #2207

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

pokey
Copy link
Member

@pokey pokey commented Jan 25, 2024

Fixes #2164

Checklist

  • [-] I have added tests
  • [-] I have updated the docs and cheatsheet
  • [-] I have not broken the cheatsheet

@pokey pokey force-pushed the pokey/dont-output-lines-with-no-annotations branch from b365c71 to b549dd7 Compare January 25, 2024 18:39
@pokey
Copy link
Member Author

pokey commented Jan 25, 2024

I think this is a win cc/ @josharian @AndreasArvidsson

@pokey
Copy link
Member Author

pokey commented Jan 25, 2024

@wenkokke this will make some of your test files shorter

@josharian
Copy link
Collaborator

josharian commented Jan 25, 2024

i'm a tentative +1. maybe a +0.

@pokey
Copy link
Member Author

pokey commented Jan 26, 2024

i'm a tentative +1. maybe a +0.

Looking at the fixtures themselves, rather than the diffs, I feel the same. I do feel it makes some tests a lot easier to read, but can see how it might slightly reduce clarity on others

@AndreasArvidsson
Copy link
Member

AndreasArvidsson commented Jan 27, 2024

I think this is an improvement. I do wonder if we also should remove empty range lines? Having those empty lines in the middle of the code block doesn't really help you with readability. Also now that we exclude lines outside of the range I'm tempted to go back to having the start range be above the code.

source:

class MyClass {
  myFunk() {

  }
}

scope:

    >----------
1|   myFunk() {
2|
3|   }
   ---<

@pokey
Copy link
Member Author

pokey commented Jan 27, 2024

I disagree on both counts 😅. Shall we aim to discuss? I'd be inclined to merge this in the meantime as I think we all tentatively agree it's an improvement?

@AndreasArvidsson
Copy link
Member

Ok with me

@pokey
Copy link
Member Author

pokey commented Jan 27, 2024

Sounds good. I'll merge once you give it the stamp

@pokey pokey added this pull request to the merge queue Jan 28, 2024
Merged via the queue into main with commit d228144 Jan 28, 2024
14 checks passed
@pokey pokey deleted the pokey/dont-output-lines-with-no-annotations branch January 28, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't show lines in our facet tests that are outside of the range
3 participants